<?php

/**
 * Produs form.
 *
 * @package    vvberp
 * @subpackage form
 * @author     Flo
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class ProdusForm extends BaseProdusForm
{
  public function configure()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'nume'       => new sfWidgetFormInput(),
      'standard'   => new sfWidgetFormInput(),
      'cod'        => new sfWidgetFormInput(),
      'material'   => new sfWidgetFormInput(),
      'dimensiune' => new sfWidgetFormInput(),
    ));
    $this->widgetSchema->setNameFormat('produs[%s]');
    $this->setValidators(array(
      'id'         => new sfValidatorPropelChoice(array('model' => 'Produs', 'column' => 'id', 'required' => false)),
      'nume'       => new sfValidatorString(array('max_length' => 255, 'required' => true), array("required" => "nume?")),
      'standard'   => new sfValidatorString(array('max_length' => 25, 'required' => true), array("required" => "standard?")),
      'cod'        => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'material'   => new sfValidatorString(array('max_length' => 20, 'required' => true), array("required" => "material?")),
      'dimensiune' => new sfValidatorString(array('max_length' => 30, 'required' => true), array("required" => "dimensiune?")),
    ));
  }
}
